#include <stdio.h>

int main() {
    int m;
    scanf_s("%d", &m);
    if (m % 5 == 0) {
        printf("YES");
    }
    else {
        printf("NO");
    }
    return 0;

}